package com.block.datapush.form.item.util;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

import java.math.BigDecimal;

public class BaiXiangRongUtil {



    public static Integer getBaoDan(String baodan){
        if (StrUtil.equals(BaseTypeInfoEnum.Insurance.in002.getValue(), baodan)){
            return 2;
        }
        return 0;
    }

    public static Integer getHouse(String house){
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu002.getValue(), house)){
            return 1;
        }
        return 2;
    }
    public static Integer getJob(String job){
        if (StrUtil.equals(BaseTypeInfoEnum.Job.job002.getValue(), job)){
            return 1;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Job.job001.getValue(), job)){
            return 3;
        }
        return 4;
    }

    public static Integer getCar(String car){
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car002.getValue(), car)){
            return 1;
        }
        return 2;
    }

    public static Integer getSheBao(String shebao){
        if (StrUtil.equals(BaseTypeInfoEnum.SocialInsurance.si002.getValue(), shebao)){
            return 1;
        }
        return 2;
    }

    public static Integer getGjj(String gjj){
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj002.getValue(), gjj)){
            return 1;
        }
        return 2;
    }

    public static Integer getZhima(String zhima){
        if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm002.getValue(), zhima)){
            return 1;
        }else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm003.getValue(), zhima)){
            return 2;
        } else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm004.getValue(), zhima)){
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm005.getValue(), zhima)){
            return 4;
        }
        return 1;
    }

    public static Integer getLoanAmount(String loanAmount){
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(),loanAmount)){
            return 1;
        }
        return 2;
    }

    public static Integer gethuabei(String huabei){
        if (StrUtil.equals(BaseTypeInfoEnum.Huabei.hb001.getValue(), huabei)){
            return 2;
        }
        return 1;
    }

    public static Integer getBaitiao(String baitiao){
        if (StrUtil.equals(BaseTypeInfoEnum.Baitiao.bt001.getValue(), baitiao)){
            return 2;
        }
        return 1;
    }

}
